<?php
	header("Content-type:text/html;charset=utf-8");
	require_once('../connect.php');
	$title=$_POST['title'];
	$author=$_POST['author'];
	$description=$_POST['description'];
	$content=$_POST['content'];
	$dateline=time();
	
	$insertsql = "insert into article(title, author, description, content, dateline) values('$title', '$author', '$description', '$content', $dateline)";

	if(mysql_query($insertsql)){
		echo "<script>alert('发布文章成功');window.location.href='article.add.php';</script>";
		}
		else{
			echo "<script>alert('发布失败');window.location.href='article.add.php';</script>";
			}
  ?>
